/* $Id: BaseDomainObjectManager.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.domain.manager;

import java.util.Collection;

import ae.pcfc.etks.online.common.exception.LookupException;
import ae.pcfc.etks.online.common.exception.PersistenceException;

public interface BaseDomainObjectManager {
	/**
	 * add
	 * Method to add an entity object
	 * @param <T>
	 * @param obj
	 * @throws PersistenceException
	 * void
	 */
	public <T> void add(T obj) throws PersistenceException;

	/**
	 * update
	 * Method to update the entity object
	 * @param <T>
	 * @param obj
	 * @throws PersistenceException
	 * void
	 */
	public <T> void update(T obj) throws PersistenceException;

	/**
	 * delete
	 * Method to delete the entity object
	 * @param <T>
	 * @param obj
	 * @throws PersistenceException
	 * void
	 */
	public <T> void delete(T obj) throws PersistenceException;

	/**
	 * findByPrimaryKey
	 * Method to find the domain object by primary key
	 * @param <T>
	 * @param id
	 * @return
	 * @throws LookupException
	 * T
	 */
	public <T> T findByPrimaryKey(String id) throws LookupException;

	/**
	 * findAll
	 * Method to find all the domain objects
	 * @param <T>
	 * @return
	 * @throws LookupException
	 * Collection<T>
	 */
	public <T> Collection<T> findAll() throws LookupException;

}
